package com.baidu.model;


import java.util.List;

import com.jfinal.plugin.activerecord.Model;

/**
 * 回帖内容字典
 * @author iicm
 * 2016-1-29 15:07
 */
public class DictContent extends Model<DictContent>{
	
	private static final long serialVersionUID = 282908528936842633L;
	public static final DictContent dao = new DictContent();
	/**
	 * 根据数量获取随机内容
	 * @param count数量
	 * @return
	 */
	public List<DictContent> queryRandomByNum(Integer count) {
		StringBuffer sql = new StringBuffer();
		sql.append("select a.* from dict_content a ");
		sql.append(" order by rand() limit ?");
		return find(sql.toString(), count);
	}
	
}
